package org.jcb.compter.presenter;

import org.jcb.compter.MainActivity;
import org.jcb.compter.dao.GlobalDAO;
import org.jcb.compter.model.BasicData;
import org.jcb.compter.model.User;
import org.jcb.compter.view.LearnView;

import android.content.Context;
import android.util.Log;
import android.view.View;

public class CountPresenter {
	private User user ;
	private GlobalDAO globalDAO ;
	Context context ;
	MainActivity mainActivity ;
	
	
	 public CountPresenter(User user, GlobalDAO globalDAO, Context context, MainActivity mainActivity) {
		super();
		this.user = user;
		this.globalDAO = globalDAO;
		this.context = context;
		this.mainActivity = mainActivity ;
	}

		public void switchView(View v) {
			mainActivity.setContentView(v);
		}
		

	public  LearnView getLearnView() {
		 return new LearnView(context, this, user) ;
	 }
	
	
	public BasicData firstItem() {
		BasicData first = new BasicData(0,"0",  "zéro","0","yi");
		return first;
	}
	
	public BasicData prevItem() {
		// TODO Auto-generated method stub
		return null;
	}


	public BasicData nextItem(BasicData basicData) {		
		int courant = Integer.parseInt(basicData.getLibLangRef()) + 1;				
		Log.d("TAG", "copuir" + courant);
		BasicData next = new BasicData(0,"" + courant,  "phon","","");
		return next;
	}


	public BasicData repeat() {
		// TODO Auto-generated method stub
		return null;
	}

	
	
}
